<template>
	<view class="all-content">
		<!-- 搜索列表 -->
		<block v-for="(item, index) in dataList" :key="index">
			<view class="cl-box" @click="toDetails(item)">
				<!-- <view > -->
				<image class="cl-img" mode="aspectFit" :src="item.livepic"></image>
				<view class="cl-title">{{item.livetitle}}</view>
				<view class="doctor">
					<view style="display: flex;">
						<block v-for="(o,i) in item.expertVOList" :key="i">
							<image class="doctor-img" mode="aspectFit" :src="o.avatar" @tap="selectD(o)"></image>
						</block>
						<image class="doctor-img" src="../../static/Frame.png"></image>
					</view>
					<view class="collect-box">
						<image class="lt-icon" src="../../static/sc.png"></image>
						{{item.collectCount}}
					</view>
				</view>
				<view class="author-name">{{selcet.name || ''}}{{selcet.department || ''}} {{selcet.rankName || ''}}刘海霞
					钻石湾院区内分泌科-副主任医师</view>
			</view>
		</block>
	</view>

</template>

<script>
	export default {
		name: "live-list",
		//属性
		props: {
			dataList: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				maskState: 0,
				content: '',
				focus: false,
				selcet: {}
			};
		},
		created() {},
		methods: {
			selectD(v) {
				this.selcet = v
			},
			toDetails(item) {
				uni.navigateTo({
					url: `../../articleVideo/live-video/live-video?id=${item.id}&liveStatus=${item.liveStatus}`
				})
			},

		}

	}
</script>

<style lang="less">
	.all-content {
		position: relative;
		width: 690rpx;
		margin: auto;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 0 16rpx;

		.cl-box {
			width: 316rpx;
			margin-bottom: 24rpx;
			box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(0, 0, 0, 0.04);
			border-radius: 24rpx;
			overflow: hidden;
			background: #FFFFFF;

			.cl-img {
				width: 316rpx;
				height: 210rpx;
				display: block;
				margin-bottom: 16rpx;
				background: #F6F6F6;
				// image {
				// 	width: 100%;
				// 	height: 100%;
				// }
			}

			.cl-title {
				font-weight: 500;
				font-size: 28rpx;
				color: #333333;
				padding: 0 20rpx;
				box-sizing: border-box;
				// text-overflow: ellipsis;
				overflow: hidden;
				// white-space: nowrap;
				width: 100%;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				line-height: 1.5;
				// max-height: 2.8em;
				height: 3.2em;
				display: -webkit-box;
			}

			.doctor {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 20rpx;
				box-sizing: border-box;

				.doctor-img {
					width: 36rpx;
					height: 36rpx;
					border-radius: 50%;
					margin-right: 4rpx;
				}

				.collect-box {
					font-size: 20rpx;
					color: #666666;
					background: #FFF0D2;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					padding: 8rpx 12rpx;
					margin-right: 16rpx;

					.lt-icon {
						width: 20rpx;
						height: 20rpx;
						margin-right: 8rpx;
					}
				}
			}

			.author-name {
				font-size: 20rpx;
				color: #666666;
				text-overflow: ellipsis;
				overflow: hidden;
				white-space: nowrap;
				padding: 10rpx 20rpx 20rpx 20rpx;
				box-sizing: border-box;
			}

		}
	}
</style>
